package icu.windea.pls.script.psi

import com.intellij.psi.*
import com.intellij.psi.tree.*
import icu.windea.pls.script.psi.ParadoxScriptElementTypes.*

object ParadoxScriptTokenSets {
    @JvmField val WHITE_SPACES = TokenSet.create(TokenType.WHITE_SPACE)
    @JvmField val COMMENTS = TokenSet.create(COMMENT)
    @JvmField val STRING_LITERALS = TokenSet.create(STRING_TOKEN)
    
    @JvmField val IDENTIFIER_TOKENS = TokenSet.create(SCRIPTED_VARIABLE_NAME_TOKEN, SCRIPTED_VARIABLE_REFERENCE_TOKEN, PROPERTY_KEY_TOKEN, STRING_TOKEN, INLINE_MATH_SCRIPTED_VARIABLE_REFERENCE_TOKEN, CONDITION_PARAMETER_TOKEN, PARAMETER_TOKEN)
    @JvmField val COMMENT_TOKENS = TokenSet.create(COMMENT)
    @JvmField val LITERAL_TOKENS = TokenSet.EMPTY
    
    @JvmField val COMPARISON_TOKENS = TokenSet.create(LT_SIGN, GT_SIGN, LE_SIGN, GE_SIGN, NOT_EQUAL_SIGN)
    @JvmField val SCRIPTED_VARIABLE_VALUE_TOKENS = TokenSet.create(BOOLEAN_TOKEN, INT_TOKEN, FLOAT_TOKEN, STRING_TOKEN)
    @JvmField val VARIABLE_VALUE_TOKENS = TokenSet.create(INT_TOKEN, FLOAT_TOKEN, STRING_TOKEN)
    @JvmField val PARAMETER_VALUE_TOKENS = TokenSet.create(SNIPPET_TOKEN)
    @JvmField val INLINE_MATH_PARAMETER_VALUE_TOKENS = TokenSet.create(INT_TOKEN, FLOAT_TOKEN)
    
    @JvmField val SCRIPTED_VARIABLE_NAME_TOKENS = TokenSet.create(SCRIPTED_VARIABLE_NAME_TOKEN)
    @JvmField val PROPERTY_KEY_TOKENS = TokenSet.create(PROPERTY_KEY_TOKEN)
    @JvmField val SCRIPTED_VARIABLE_REFERENCE_TOKENS = TokenSet.create(SCRIPTED_VARIABLE_REFERENCE_TOKEN, INLINE_MATH_SCRIPTED_VARIABLE_REFERENCE_TOKEN)
    @JvmField val STRING_TOKENS = TokenSet.create(STRING_TOKEN)
    @JvmField val KEY_OR_STRING_TOKENS = TokenSet.create(PROPERTY_KEY_TOKEN, STRING_TOKEN)
    @JvmField val PARAMETER_TOKENS = TokenSet.create(PARAMETER_TOKEN, CONDITION_PARAMETER_TOKEN)
    
    @JvmField val VALUES = TokenSet.create(BOOLEAN, INT, FLOAT, STRING, COLOR, BLOCK, INLINE_MATH, SCRIPTED_VARIABLE_REFERENCE)
    
    @JvmField val TEMPLATE_TYPES = TokenSet.create(PROPERTY_KEY, STRING, SCRIPTED_VARIABLE_NAME, SCRIPTED_VARIABLE_REFERENCE)
    @JvmField val SNIPPET_TYPES = TokenSet.create(PROPERTY_KEY_TOKEN, STRING_TOKEN, SCRIPTED_VARIABLE_NAME_TOKEN, SCRIPTED_VARIABLE_REFERENCE_TOKEN)
    
    @JvmField val SCRIPTED_VARIABLE_SEPARATOR_TOKENS = TokenSet.create(EQUAL_SIGN)
    @JvmField val PROPERTY_SEPARATOR_TOKENS = TokenSet.create(EQUAL_SIGN, LT_SIGN, GT_SIGN, LE_SIGN, GE_SIGN, NOT_EQUAL_SIGN)
    
    @JvmField val BLOCK_OR_ROOT_BLOCK = TokenSet.create(BLOCK, ROOT_BLOCK)
}
